﻿@model iMathMvc4.ModelViews.ExamView

@{
    ViewBag.Title = "Details";
}

<h2>Details</h2>

<fieldset>
    <legend>ExamView</legend>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.Name)
    </div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Name)
    </div>

    <div class="display-label">
         @Html.DisplayNameFor(model => model.Description)
    </div>
    <div class="display-field">
        @Html.Raw(Model.Description)
    </div>
     <div class="display-label">
         @Html.DisplayFor(model => model.StratDate)
    </div>
    <div class="display-field">
        @Html.DisplayNameFor(model => model.StratDate)
    </div>
     <div class="display-label">
         @Html.DisplayFor(model => model.EndDate)
    </div>
    <div class="display-field">
        @Html.DisplayNameFor(model => model.EndDate)
    </div>
    @Html.Raw("DANH SACH CAC CAU HOI TRONG KY THI") <br />
    @foreach (var question in Model.Questions)
    {
        <div class="display-label">
            @Html.Raw(question.Title) <br />
            @Html.Raw(question.Content)
        </div>        
        <hr />
    }
</fieldset>
<p>
    @* examId truyền qua hàm Create bên QuestionController  *@
    @Html.ActionLink("Add Question", "Create", "Question", new { examId = Model.Id }, null) |
    @Html.ActionLink("Edit", "Edit", new { id=Model.Id }) |
    @Html.ActionLink("Back to List", "Index")
</p>
